import { defineStore } from 'pinia'
import { ref } from 'vue'

const initState = {
  policyType: '',
  orderType: '',
  hallStar: '',
  lessonType: '',
  jointActivityCategory: '', // 文化定制菜单 - 类型
}

export const useDictStore = defineStore(
  'dict',
  () => {
    const dictData = ref({ ...initState })

    const setDictData = (val) => {
      dictData.value = val
    }

    const clearDictData = () => {
      dictData.value = { ...initState }
    }

    return {
      dictData,
      setDictData,
      clearDictData,
    }
  },
  {
    persist: true,
  },
)
